package com.zhicheng.service.impl;

import com.zhicheng.mapper.HomeMapper;
import com.zhicheng.pojo.Category;
import com.zhicheng.pojo.CategoryTwo;
import com.zhicheng.pojo.Good;
import com.zhicheng.pojo.vo.BannerVO;
import com.zhicheng.pojo.vo.CategoryTwoVO;
import com.zhicheng.pojo.vo.CategoryVO;
import com.zhicheng.pojo.vo.GoodVO;
import com.zhicheng.service.HomeService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class HomeServiceImpl implements HomeService {

    @Autowired
    private HomeMapper homeMapper;

    /**
     * 获取一级分类列表
     * @return
     */
    @Override
    public List<CategoryVO> getCategoryHead() {
        List<CategoryVO> category = homeMapper.selectCategoryAll();
        return category;
    }


    /**
     * 获取全部轮播图数据
     * @return
     */
    @Override
    public List<BannerVO> selectBannerAll() {
        List<BannerVO> banner = homeMapper.selectBannerAll();
        return banner;
    }

    /**
     * 获取全部商品数据
     * @return
     */
    @Override
    public List<CategoryVO> getGoods() {
        List<CategoryVO> goods = homeMapper.selectCategoryAll();

        return goods;
    }




}

